<?php

class G4T_AdminController extends G4T_Controller
{

    public function init()
    {
        if ($this->_request->isXmlHttpRequest()) {
            $this->_helper->layout()->disableLayout();
        } else {
            $this->_helper->layout()->setLayout('admin-layout');
        }

//        $usersession = new \Zend_Session_Namespace("usersession");
//        if (!($usersession->general == "generalisimus")) {
//            $this->_redirect('/login');
//        }

        $this->_flashMessenger = new Lib_Flash();
        $this->_logger = \Zend_Registry::get('g4t.log');
    }

    public function __call($name, $args)
    {
        $this->_flashMessenger->addMessage("This page does not exist.", Lib_Flash::ERROR, Lib_Flash::PRE);
        $this->_forward('index');
    }

    public function indexAction()
    {

    }
}
